/*
 * SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO LTD
 *
 * SPDX-License-Identifier: CC0-1.0
 */

#pragma once

#include <stdbool.h>
#include <stdint.h>
#include "esp_err.h"

#define RETURN_ON_ERROR(x)  do { esp_err_t _err_ = (x); if (unlikely(_err_ != ESP_OK)) { return _err_; }} while(0)